package cn.forkway.impl;

import cn.forkway.dao.StudentDao;
import cn.forkway.domain.Student;
import cn.forkway.queryParam.stuQueryParam;
import cn.forkway.resultMap.stuMap;
import cn.forkway.utils.MybatisUtils;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

/**
 * @program: java-learn-mybatis
 * @className: StudentDaoImpl.java
 * @author: River Ray
 * @description: 传统的Dao方法
 * @createTime 2021年10月10日 13:45:00
 */
public class StudentDaoImpl implements StudentDao {
   @Override
   public  List<Student> selectStudent() {
      SqlSession sqlSession = MybatisUtils.getSession();
      String sqlId = "cn.forkway.domain.Student" + "." + "selectStudent";
      List<Student> studentList = sqlSession.selectList(sqlId);
      sqlSession.close();
      return studentList;
   }
   @Override
   public int insertStudent(Student student) {
      return 0;
   }

   @Override
   public List<Student> selectStudentById(Integer id) {
      return null;
   }

   @Override
   public List<Student> selectStudentByNameAge(Integer age, String name) {
      return null;
   }

   @Override
   public List<Student> selectStudentByQueryParam(stuQueryParam param) {
      return null;
   }

   @Override
   public List<stuMap> selectStudentByQueryParamResultMap(stuQueryParam param) {
      return null;
   }
}
